home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
com
/
computer
/
casiomdo
/
farbcode.cas
< prev
next >
Wrap
Text File
|
1994-03-01
|
2KB
|
52 lines
10 'Farbcode (c) uk 01.08.92
20 CLS:CLEAR:LOCATE 0,0:PRINT"[K]ohleschicht (4 Ringe)";
30 LOCATE 0,1:PRINT"[M]etallfilm (5 Ringe)";:R=1:Z$=INPUT$(1,@)
40 IF Z$="K" THEN R=4
50 IF Z$="M" THEN R=5
60 IF R=1 THEN 20
70 CLS:LOCATE0,0:PRINT CHR$(230);"Schw Brau Rot Oran Gelb Gr";CHR$(255);"n Blau Lila Grau Wei";CHR$(137);" Gold Silb";
80 DEFCHR$(255)="5C0202045E":NULL$="000000000"
90 Z=0:S=0:V=0:I=1
100 DIM R(R)
110 T=ASC(INPUT$(1,@))
120 V=0
130 IF T=28THEN S=S+5:V=1
140 IF S>26THEN S=0
150 IF T=29THEN S=S-5:V=1
160 IF S<0THEN S=25
170 IF T=30THEN Z=Z+1:V=1
180 IF Z>1THEN Z=0
190 IF T=31THEN Z=Z-1:V=1
200 IF Z<0THEN Z=1
210 IF T=13 THEN R(I)=S\5+Z*6:I=I+1
220 IF V=1 THEN LOCATE0,0:PRINT " Schw Brau Rot Oran Gelb Gr";CHR$(255);"n Blau Lila Grau Wei";CHR$(137);" Gold Silb";
230 LOCATE S,Z:PRINT CHR$(230);
240 IF I=R+1 THEN 260
250 GOTO 110
260 IF R=4 THEN GOSUB 300
270 IF R=5 THEN GOSUB 370
280 GOSUB 440
290 GOTO 20
300 IF R(3)=10 THEN AUS$=RIGHT$(STR$(R(1)),1)+"."+RIGHT$(STR$(R(2)),1)
310 IF R(3)=11 THEN AUS$="."+RIGHT$(STR$(R(1)),1)+RIGHT$(STR$(R(2)),1)
320 IF R(3)<10 THEN AUS$=RIGHT$(STR$(R(1)),1)+RIGHT$(STR$(R(2)),1)+MID$(NULL$,1,R(3))
330 IF R(4)=2 THEN L=2:RETURN
340 IF R(4)=10 THEN L=5:RETURN
350 IF R(4)=11 THEN L=10 ELSE L=20
360 RETURN
370 IF R(4)=10 THEN AUS$=RIGHT$(STR$(R(1)),1)+RIGHT$(STR$(R(2)),1)"."+RIGHT$(STR$(R(3)),1)
380 IF R(4)=11 THEN AUS$="."+RIGHT$(STR$(R(1)),1)+RIGHT$(STR$(R(2)),1)+RIGHT$(STR$(R(3)),1)
390 IF R(4)<10 THEN AUS$=RIGHT$(STR$(R(1)),1)+RIGHT$(STR$(R(2)),1)+RIGHT$(STR$(R(3)),1)+MID$(NULL$,1,R(4))
400 IF R(5)=1 THEN L=1:RETURN
410 IF R(5)=2 THEN L=2:RETURN
420 IF R(5)=5 THEN L=0.5 ELSE L=20
430 RETURN
440 AUS=VAL(AUS$)
450 AUSK=AUS/1000
460 AUSM=AUS/1000000
470 CLS
480 IF FIX(AUSK)>0 AND FIX(AUSM)=0 THEN PRINT AUSK;" K";CHR$(133);" +/-";L;"%"
490 IF FIX(AUSM)>0 THEN PRINT AUSM;" M";CHR$(133);" +/-";L;"%"
500 IF AUS<1000 THEN PRINT AUS;CHR$(133);" +/-";L;"%"
510 RETURN